home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / src / PHP / php.exe / Quote Changer.php < prev    next >
Encoding:
PHP Script  |  2001-07-03  |  3.3 KB  |  60 lines

  1. //**************************************
  2.     //     
  3.     // Name: Quote Changer
  4.     // Description:This is a little script t
  5.     //     hat allows you to put a quote on your pa
  6.     //     ge and easily change it using a PHP scri
  7.     //     pt. I developed this script on Windows N
  8.     //     T but it should work fine on any Linux o
  9.     //     r Unix system. by Brian http://www.evilw
  10.     //     alrus.com
  11.     // By: PHP Code Exchange
  12.     //**************************************
  13.     //     
  14.     
  15.     <?php
  16.     /* 
  17.     Quote Changer Copyright 2000 Brian Ross
  18.     Version 1.0
  19.     brian@music4free.com
  20.     AIM: DeadBrain3
  21.     ICQ: 15273600
  22.     http://brian.zero-gravity.org/php/
  23.     How to install:
  24.     1. Edit the variables below to fit your needs.
  25.     2. Create the datafile that you showed in $path and chomd to it 777.
  26.     3. Use either a PHP or SSI include to insert the quote onto the page you want.
  27.     Example: include("d:\\home\\httpd\\html\\news\\data2\\1.viewh"); (you must put in on in PHP brackets)
  28.     */ 
  29.     $prefix = "<center>";//what you want to appear before the quote line 
  30.     $suffix = "</center>";//what you want to appear after the quote line 
  31.     $password = "change";//the password you need to change the quote 
  32.     $path = "c:\\Brian\\Brain's Pad\\php-bin\\quote.dat";//path to datafile 
  33.     if ($pass != $password) {
  34.         echo "<html><head><title>DLCount Admin - Enter Password</title></head><body>";
  35.         echo "<form method=\"post\" action=$PHP_SELF>";
  36.         echo "Enter your password:<br>";
  37.         echo "<input type=\"password\" name=\"pass\">";
  38.         echo "<input type=\"submit\" value=\"continue\">";
  39.         echo "</form></body></html>";
  40.     }
  41.     else {
  42.     if ($quote . $person != "") {
  43.     $ff = fopen($path,"w");
  44.     fputs($ff,$prefix . stripslashes($quote) . "<br><b>-" . stripslashes($person) . "</b>" . $suffix . "\n");
  45.     fclose($ff);
  46.     print "The Quote Was Successfully Changed To:<br>\n"; //html
  47.     print "<small><b>Quote: </b>" . stripslashes($quote) . "<br><b>Author: </b>" . stripslashes($person) . "\n"; //html
  48.     print "<center><hr width=300 size=1 height=1 noshade color=\"#000000\"><br>\n"; //html
  49.     print "<font face=\"Arial\" size=\"1\" color=\"#000000\">Powered By <a href=\"http://brian.zero-gravity.org/php/\">Quote Changer 1.0</a></font><br>\n"; //html
  50.     }
  51.     else {
  52.     print "<center>\n"; //html
  53.     print "<p><form method=\"POST\" action=\"\"><center><table border=0><tr><td>Quote: </td><td><center><input type=\"text\" name=\"quote\" size=\"30\"><br><font size=\"1\">\"To be or not to be, that is the question.\"</center></font></td></tr><tr><td>Author: </td><td><center><input type=\"text\" name=\"person\" size=\"30\"><br><font size=\"1\">William Shakespeare</font></center></td></tr></table><center><input type=\"hidden\" name=\"pass\" size=\"30\" value=\"" . $password . "\"><input type=\"submit\" value=\"-Change-\" class=\"button\"> <input type=\"reset\" value=\"-Reset-\" class=\"button\"></center></form>\n"; //html
  54.     print "</center>\n"; //html
  55.     print "<center><hr width=300 size=1 height=1 noshade color=\"#000000\"><br>\n"; //html
  56.     print "<font face=\"Arial\" size=\"1\" color=\"#000000\">Powered By <a href=\"http://brian.zero-gravity.org/php/\">Quote Changer 1.0</a></font><br>\n"; //html
  57.     }
  58.     } 
  59.     ?>
  60.